<template>
    <div class="content-box">
        <div class="container">
            <el-descriptions class="margin-top" title="查看用户信息" :column="1" :size="size" border>
                <el-descriptions-item>
                    <template slot="label">
                        <i class="el-icon-user"></i>
                        用户名
                    </template>
                    {{username}}
                </el-descriptions-item>
                <el-descriptions-item>
                    <template slot="label">
                        <i class="el-icon-mobile-phone"></i>
                        手机号
                    </template>
                    {{phone}}
                </el-descriptions-item>
                <el-descriptions-item>
                    <template slot="label">
                        <i class="el-icon-location-outline"></i>
                        居住地
                    </template>
                    南京市
                </el-descriptions-item>
                <el-descriptions-item>
                    <template slot="label">
                        <i class="el-icon-lock"></i>
                        密码
                    </template>
                    {{password}}
                </el-descriptions-item>
                <el-descriptions-item>
                    <template slot="label">
                        <i class="el-icon-office-building"></i>
                        联系地址
                    </template>
                    江苏省南京市栖霞区仙林大道 163 号
                </el-descriptions-item>
                <el-descriptions-item>
                    <template slot="label">
                        <i class="el-icon-money"></i>
                        余额
                    </template>
                    {{money}}
                </el-descriptions-item>
            </el-descriptions>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            labelPosition: 'right',
            formLabelAlign: {
                name: '',
                region: '',
                type: ''
            }
        };
    },
    computed: {
    username(){
      return localStorage.getItem('ms_username') || '';
    },
    phone(){
      return localStorage.getItem('ms_phone') || '';  
    },
    password(){
      return localStorage.getItem('ms_password') || '';  
    },
    money(){
      return localStorage.getItem('ms_money') || '';  
    },
  },
};
</script>

<style>
.title {
    font-size: larger;
    margin-bottom: 30px;
}
.user {
    height: 100%;
    width: auto;
}
</style>
